home *** CD-ROM | disk | FTP | other *** search
- /* test sf_stdio.c
- *
- * Chris Borton, 27 February 1988
- * Prompt for text file with SFGetFile and use that as a stream of input
- * like stdin.
- */
-
- #include <stdio.h>
- #include <proto.h>
- #include "sf_stdio.h"
-
- int main(void);
-
- main()
- {
- char c;
-
- printf("Starting up...\n");
-
- if (sf_stdin()) {
- while ((c = getc(stdin)) != EOF)
- printf("%c",c);
- }
-
- printf("Now choose an output file and type until 'q':\n\n");
-
- if (sf_stdout()) {
- while ((c = getch()) != 'q')
- fputc(c,stdout);
- }
- }